{include file='public/meta'}
<title>添加管理员</title>
{css href='/static/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css'}
</head>
<style type="text/css">
  .row{margin-right:40px;}
</style>
<body>
<link href="/static/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="cl pd-20">
	<form action="" method="post" class="form form-horizontal" id="form-article-add" enctype="multipart/form-data">
    <!-- 上传图 -->
		<div class="row cl">
          <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>选择图片：</label>
          <div class="formControls col-xs-8 col-sm-9">
              <div class="uploader-thum-container">
                  <input type="file" name="img[]" class="input-text" multiple required>
              </div>
          </div>
      </div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button class="btn btn-primary radius" id="submit" type="submit"><i class="Hui-iconfont">&#xe632;</i> 上传</button>
			</div>
		</div>
	</form>
</div>
{include file='public/footer'}
  <script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
  <script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
  <script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
  <script type="text/javascript" src="/static/lib/webuploader/0.1.5/webuploader.min.js"></script> 
  <script type="text/javascript" src="/static/lib/ueditor/1.4.3/ueditor.config.js"></script>
  <script type="text/javascript" src="/static/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
  <script type="text/javascript" src="/static/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">
  $().ready(function(){
  	$('form').validate({
  		submitHandler:function(form){
  			$(form).ajaxSubmit({
  				type:'post',
  				url:'{:url('admin/renter/img_add')}?rid={:input('get.rid')}',
  				dataType:'text',
  				success:function(res){
		            res = eval('('+res+')');
                console.log(res.msg);
		            if(res.msg == '添加成功'){
		            	layer_close();	    
		            }
	  			}
  			})
  		}
  	});
  })

  $(function(){
  	$('.skin-minimal input').iCheck({
  		checkboxClass: 'icheckbox-blue',
  		radioClass: 'iradio-blue',
  		increaseArea: '20%'
  	});
  });

</script>
</body>
</html>